<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0; 
        } 
    </style>
</head>

<body>
    <button id="btn">点我</button>  
    <script src="./tost.js"></script>
    <script> 
      var btn = document.getElementById("btn");
        btn.onclick = function(){
          var time =parseInt( 10000*Math.random()) 
          $showTost('时间戳'+new Date().getTime()+'--消失时间--'+time ,time)
        }
       
    </script>  
</body>

</html>